/**********************************************************************
xing yongkang
College of Computer Science and Technology, Chongqing University, China.
************************************************************************/
#include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;

long factorial(int n)
{
    long result = 1;
    for(int i = 1; i<=n; i++)
    {
        result = result * i;
    }
    return result;
}

int main()
{
    int n;
    cin>>n;
    double e = 1.0;
    int i = 1;
    long tenExp =  pow(10,n);
    while(true)
    {
        long temp = factorial(i);
        if(temp<=tenExp)
             e = e + (double)1.0/temp;
        else 
            break;
        i = i + 1;

    } 
    cout<<fixed<<setprecision(n)<<e<<endl;  
}